<!DOCTYPE html>
<html lang="en">
<head>
    <title>APP面访</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
          name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=4a6c1b54">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=16f1e6f3">
    <script src="https://file.ggxqce.com/web/vue.min.js"></script>
    <style>
        [v-cloak] {
            display: none;
        }

        * {
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
            outline: none;
        }

        body {
            background: #eee;
        }
        .btn-blue {
            border: none;
            background: #2a8ced;
            color: #fff;
            height: 30px;
            width: 14%;
            border-radius: 3px;
        }
        .visitingBox{
            background: #fff;
            padding-bottom: 10px;
        }
        .item{
            height: 45px;
            line-height: 45px;
            margin-left: 20px;
            padding-left: 5px;
            font-size: 14px;
            border-bottom: 1px solid #ddd;
        }

        .btn-blue.focus, .btn-blue:focus, .btn-blue:hover {
            color: #fff;
            text-decoration: none;
        }

        .lineTwo span {
            max-height: 55px;
            line-height: 16px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 3;
            text-align: left;
            padding: 5px;

        }

        .div-td-content-more {
            position: absolute;
            height: auto;
            z-index: 999;
            line-height: 20px;
            background-color: #d3e8fd;
            padding: 8px 6px;
            border: 1px solid #e8e8ea;
            display: none;
        }

        .div-td-content-more i {
            width: 15px;
            height: 12px;
            background: url("/dist/img/more-icon.png");
            position: absolute;
            left: 50px;
            top: -12px;
        }
        .imgBox{
            margin-left: 20px;
        }
        .imgBox .title{
            padding-left: 5px;
            height: 45px;
            line-height: 45px;
            position: relative;
            font-size: 14px;
        }
        .imgBox .title i{
            position: absolute;
            left: -10px;
            top: 2px;
            color: red;
            font-size: 16px;
        }
        .imgBox img{
            width: 80px;
            height: 80px;
            margin-bottom: 20px;
        }
        .imgBox .desc{
            color:#aaa;
        }
        .btnBox{
            width: 120px;
            height: 120px;
            margin: 0 auto;
            margin-top: 60px;
            position: relative;
        }
        .btnBj{
            background: #cde2f7;
            border-radius: 50%;
            width: 100%;
            height: 100%;
            position:relative;
            animation:mymove 3s infinite;
            -webkit-animation:mymove 3s infinite; /*Safari and Chrome*/
            animation-direction:alternate;/*轮流反向播放动画。*/
            animation-timing-function: linear; /*动画的速度曲线*/
            /* Safari 和 Chrome */
            -webkit-animation:mymove 3s infinite;
            -webkit-animation-direction:alternate;/*轮流反向播放动画。*/
        }
        .btn.active{
            background: #2a8cec;
        }
        .btn{
            position: absolute;
            width: 96px;
            height: 96px;
            left:50%;
            top:50%;
            margin-left: -48px;
            margin-top: -48px;
            border-radius: 50%;
            background: #dfdfdf;
            color:#fff;
        }
        .btn .time{
            font-size: 20px;
            margin-top: 14px;
        }
        .btn .start{
            font-size: 16px;
        }
        @keyframes mymove
        {
            0%{
                transform: scale(1);  /*开始为原始大小*/
            }

            50%{
                transform: scale(0.8);
            }

        }

        @-webkit-keyframes mymove /*Safari and Chrome*/
        {
            0%{
                transform: scale(1);  /*开始为原始大小*/
            }

            50%{
                transform: scale(0.8);
            }
        }
    </style>
</head>
<body>
<section class="content" id="app" style="padding: 0px;" v-cloak>
    <div class="visitingBox">
        <div class="item">
            <div class="title">客户电话</div>
            <div class="value">{{mobile}}</div>
        </div>
        <div class="item">
            <div class="title">客户姓名</div>
            <div class="value">{{customerName}}</div>
        </div>
        <div class="item">
            <div class="title">微&nbsp;信&nbsp;号</div>
            <div class="value"></div>
        </div>
        <div class="item">
            <div class="title">陪同人员</div>
            <div class="value"></div>
        </div>
        <div class="imgBox">
            <div class="title"><i>*</i>图片</div>
            <img src="/dist/img/noImg.png" alt="">
            <div class="desc">提示：到达客户位置附近需进行签到拍照，如有陪同请拍合照。<br>(长按可以删除照片)</div>
        </div>
    </div>
    <div class="btnBox">
        <div class="btnBj ">
        </div>
        <div class="btn ">
            <div class="time">{{date}}</div>
            <div class="start" @click="save()">面访签到</div>
        </div>
    </div>
</section>
<!--JQ-->
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="/dist/plugins/scroll/myScroll.js"></script>
<!--框架已定义 JS-->
<!--oa自定义  JS-->
<script src="/dist/js/oaApp.js"></script>
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<script>
    $(function () {
        $("body").on("click", ".lineOne,.lineTwo", function (e) {
            if ($(".div-td-content-more").is(":hidden")) {
                var text = $(this).text();
                if (text != "") {
                    text = "<i></i>" + text;
                    $(".div-td-content-more").html(text).css({
                        "width": $(this).outerWidth() + "px",
                        "left": $(this).offset().left,
                        "top": ($(this).offset().top + $(this).outerHeight()) + "px"
                    }).show();
                    e.stopPropagation();
                }
            } else {
                $(".div-td-content-more").hide();
            }
        });
        $("body").on("click", ".div-td-content-more", function (e) {
            e.stopPropagation();
        });
        $("body").on("click", function () {
            $(".div-td-content-more").hide();
        });
    });
</script>
<script>
    $.ajaxSetup({
        global: true,
        type: "POST",
        cache: false,
        dataType: "json",
        contentType: 'application/json;charset=utf-8',
        beforeSend: function () {
        },
        complete: function () {

        },
        error: function (e) {
            alert('error' + e.responseText);
        }
    });
    $.extend($.wyui, {
        page: {
            urlParams: null,
            queryParams: {
                requestPage: 1,
                pageSize: 30
            },
            dataUrl: '',
            createQueryParams: function () {
            },
            getByPage: function (type) {
                $.ajax({
                    url: $.wyui.page.dataUrl,
                    data: JSON.stringify($.wyui.page.queryParams),
                    beforeSend: function () {

                    },
                    complete: function () {
                    },
                    success: function (r) {
                        $.wyui.page.queryParams.requestPage++;

                        if (r.data.sendData.pager && r.data.sendData.pager.pageCount == 0) {
                            r.data.sendData.pager.pageCount = 1;
                        }
                        if (type == "scroll") {
                            $.wyui.page.getByPage_scroll_callback(r.data.sendData.records);
                        } else {
                            if ($.wyui.page.getByPage_callback_new) {
                                $.wyui.page.getByPage_callback_new(r.data.sendData.records);
                            }
                        }

                    }
                });
            }
        },
        postMethod: function (url, data, callback, sync, id) {
            if (!id) {
                id = "#app"
            }
            $.ajax({
                url: server.ip + url,
                async: sync ? false : true,
                data: JSON.stringify(data),
                beforeSend: function () {

                },
                complete: function () {
                    setTimeout(function () {
                    }, 1000);

                },
                success: function (r) {
                    if (!r.e.code) {
                        callback(r.data.sendData);
                    } else {
                        alert(r.e.desc);
                    }
                },
                error: function (e) {
                    alert(url + e.responseText);
                }
            });
        },
    });
</script>
<script type="text/javascript">
    var app = new Vue({
        el: '#app',
        data: {
            userId: getUrlParamObj().userId,
            customerId: getUrlParamObj().customerId,
            customerName: getUrlParamObj().customerName,
            mobile: getUrlParamObj().mobile,
            userType: getUrlParamObj().userType,
            date: "",
            isMore:false
        },
        methods: {
            save: function () {
                var that = this;
                var data = {
                    'customerTel': that.mobile,
                    'customerId': that.customerId,
                    'customerName': that.customerName,
                    'customerType': that.userType,
                }
                $.wyui.postMethod("/crmCusVisit/faceInApp.json",data, function (data) {
                    console.log(data)
                });
            },

        },
        mounted: function () {
            var _this = this; //声明一个变量指向Vue实例this，保证作用域一致
            _this.date = new Date().Format("hh:mm"); //修改数据date
            this.timer = setInterval(function(){
                _this.date = new Date().Format("hh:mm"); //修改数据date
            },1000)
            //页面初次加载  执行客户分页列表
        }
    });

</script>

</body>